home *** CD-ROM | disk | FTP | other *** search
- /* set_date() */
- /* This function performs a system function call to set the system */
- /* date with the parameters passed. */
-
- set_date(month, day, year)
- int month, day, year;
-
- #define SET_DATE 0x2B
- #define byte char
- #define ONE 1
- #define TWO 2
- #define THREE 3
- #define FOUR 4
- #define FIVE 5
- #define SIX 6
- #define SEVEN 7
-
- {
-
- int hold_yr;
- struct XREG {short ax, bx, cx, dx, si, di;};
- struct HREG {byte al, ah, bl, bh, cl, ch, dl, dh;};
- union REGS {
- struct XREG x;
- struct HREG h;
- } inregs, outregs;
-
- inregs.h.dl = day;
- inregs.h.dh = month;
- inregs.x.cx = year + 1900;
-
- inregs.h.ah = SET_DATE;
- inregs.h.al = 0;
- intdos(&inregs, &outregs);
-
- }